﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Untitled Page</title>
	<link href="../Themes/Default/CommonCtrl.css" rel="stylesheet" type="text/css" />
	<link href="../Themes/Default/RichEditor.css" rel="stylesheet" type="text/css" />

	<script src="../Core/Common.js" type="text/javascript"></script>

	<script src="../UI/CommonCtrl.js" type="text/javascript"></script>

	<script src="../UI/RichEditor.js" type="text/javascript"></script>

	<style type="text/css">
		#richEditor1
		{
			position: absolute;
			left: 50px;
			right: 50px;
			top: 250px;
			bottom: 50px;
			_width: expression((this.parentElement.offsetWidth - 100) + 'px');
			_height: expression((this.parentElement.offsetHeight - 300) + 'px');
		}
	</style>

	<script type="text/javascript" language="javascript">

		window.onload = function()
		{
			Core.UI.PagePanel.Create('<div id="richEditor1"></div>');
			window.editor = new Core.UI.RichEditor(document.getElementById("richEditor1"));
			window.editor.OnKeyDown.Attach(
				function(e)
				{
					if (e.keyCode == 13)
					{
						window.editor.GetDocument().body.innerHTML = " ";
						e.keyCode = 0;
						Core.Utility.PreventDefault(e);
					}
				}
			);
		}

		function Focus()
		{
			setTimeout(function() { if (window.editor != undefined) window.editor.Focus(); }, 10);
		}
	
	</script>

</head>
<body>
</body>
</html>
